// 请求方式的封装
import request from '../request'

async function getAdminList(){
    return await request.get('/adminList')
}

async function addAdmin(payload){
    return await request.post('/addAdmin',payload)
}

async function deleteAdmin(_id){
    return await request.get('/deleteAdmin',{params:{_id}})
}

async function login(payload){
    return await request.post('/login',payload)
}

async function logout(){
    return await request.get('/logout')
}
export default {
    getAdminList,
    addAdmin,
    deleteAdmin,
    login,
    logout
}